
FROM phpswoole/swoole:php8.2-alpine

RUN sed -i 's/https/http/' /etc/apk/repositories \
    && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
    && apk --update add tzdata \
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apk del tzdata \
    && rm -rf /var/cache/apk/*

RUN docker-php-ext-install -j8 mysqli pdo_mysql

# PHPIZE_DEPS 参考于： https://github.com/hyperf/hyperf-docker/blob/master/8.1/alpine/swoole/Dockerfile
RUN set -ex \
    && pecl update-channels \
    && apk add --no-cache --virtual .build-deps ca-certificates curl wget tar xz tzdata pcre \
       php82-redis \
    \
    # ---------- clear works ----------
    && apk del .build-deps \
    && apk del --purge *-dev \
    && rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php82


# docker build -t cffycls/phpswoole:alpine .
# docker push cffycls/phpswoole:alpine
# docker build -t cffycls/phpswoole:imagick .
# docker run -it phpswoole/swoole:php8.2-alpine php -m
#
# 已存在MySQL+redis无须更改
# [PHP Modules]
# Core
# ctype
# curl
# date
# dom
# fileinfo
# filter
# ftp
# hash
# iconv
# json
# libxml
# mbstring
# mysqlnd
# openssl
# pcre
# PDO
# pdo_mysql
# pdo_sqlite
# Phar
# posix
# random
# readline
# redis
# Reflection
# session
# SimpleXML
# sockets
# sodium
# SPL
# sqlite3
# standard
# swoole
# tokenizer
# xml
# xmlreader
# xmlwriter
# zlib
#
# [Zend Modules]

